#include "BakeProcessor.h"

#include "Occluder.h"
#include "Light.h"

namespace baker
{
    //--------------------------------------------------------------------------
    BakeProcessor::BakeProcessor( void )
    {
        g_print( "BakeProcessor created\n" );
    }

    //--------------------------------------------------------------------------
    BakeProcessor::~BakeProcessor( void )
    {
        g_print( "BakeProcessor destroying\n" );

        // delete lights
        foreach( mLights, cb::ptr_fun( safeDelete<ILight> ) );

        // delete occluders
        foreach( mOccluders, cb::ptr_fun( safeDelete<IOccluder> ) );

        g_print( "BakeProcessor destroyed\n" );
    }

    //--------------------------------------------------------------------------
    IOccluder * BakeProcessor::createOccluder( void )
    {
        IOccluder * occluder = NULL;
        mOccluders.append( occluder );

        return occluder;
    }

    //--------------------------------------------------------------------------
    ILight * BakeProcessor::createLight( void )
    {
        ILight * light = new Light;
        mLights.append( light );

        return light;
    }

    //--------------------------------------------------------------------------
    //--------------------------------------------------------------------------
    //--------------------------------------------------------------------------

}
